/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ericsson.nfc.signing.record;

/**
 *
 * @author emarkki
 */
public class InvalidSignatureRecord extends Exception {

    public static final int EXCEPTION = 0;
    public static final int VERSION = 1;
    public static final int SIGNATURE_TYPE = 2;
    public static final int CERTIFICATE_FORMAT = 3;
    
    private int cause;
    private Throwable causedBy;
    
    
    public InvalidSignatureRecord(int cause, String msg) {
        super(msg);
        this.cause = cause;
    }

    public InvalidSignatureRecord(Throwable causedBy) {
        this.cause = EXCEPTION;
        this.causedBy = causedBy;
    }
    
    public int getCause() {
        return cause;
    }

    public Throwable getCausedBy() {
        return causedBy;
    }
    
}
